package loan.calc.exception;

import lombok.Getter;

@Getter
public enum ExceptionEnum {

    /**
     * 未知异常
     */
    SYS_ERR(99999,"系统异常"),
    RESOURCE_EX(99998,"资源读取/写入出错"),
    ILLEGAL_ARGS_EX(98888,"参数不合法"),
    JWT_TOKEN_EXPIRED(94031,"会话过期"),
    JWT_SIGNATURE(94032, "不合法的token，请认真比对token的签名"),
    JWT_ILLEGAL_ARGUMENT(94003, "缺少token参数"),
    JWT_GEN_TOKEN_FAIL(90004, "生成token失败"),
    JWT_PARSER_TOKEN_FAIL(94005, "解析token失败"),


    ;

    private final Integer code ;

    private final String defaultMessage;

    ExceptionEnum(Integer code, String defaultMessage) {
        this.code = code;
        this.defaultMessage = defaultMessage;
    }
}
